<?php

namespace app\checkbill\controller;
use app\common\controller\PCBase;
use app\checkbill\logic\CheckMonthFeeLogic;
use app\checkbill\logic\CheckMonthOldLogic;


class CheckMonthFee extends PCBase
{

    /**
     * @desc   月度账单回款导入页面
     * @author luckyXiong
     * @date   2024-06-06
     */
    public function index(){
        $params = $this->request->post();
        $res    = (new CheckMonthOldLogic())->get_list($params);
        return $this->jsonMessage(200,'true','获取成功',$res);
    }


    /**
     * @desc   月度账单导入老模版
     * @author luckyXiong
     * @date   2024-06-06
     */
    public function oldImport(){
        $file   = $this->request->file('file');
        $tel    = $this->getAdminTel();
        $data['file'] = $file;
        $data['tel']  = $tel;
        (new CheckMonthOldLogic())->uploadInfo($data);
        return  $this->jsonMessage(200,true,'导入成功',null);
    }


    /**
     * @desc   月度账单导入新模版
     * @author luckyXiong
     * @date   2024-06-06
     */
    public function newImport(){
        $file   = $this->request->file('file');
        $tel    = $this->getAdminTel();
        $data['file'] = $file;
        $data['tel']  = $tel;
        $res = (new CheckMonthFeeLogic())->uploadInfo($data);
        return  $this->jsonMessage(200,true,'导入成功',$res);
    }













}